<?php

namespace app\home\controller;

use app\common\model\ManagerCompany as ManagerCompanyModel;
use app\common\model\ManagerPassword as ManagerPasswordModel;
/**
 * 修改密码控制器
 * Class Index
 * @package app\index\controller
 */
class Managerpassword extends Base
{
    /**
     * [postStatus  修改状态]
     * @param
     * @return mixed|\think\response\Json
     * @author [C。]
     */
    public function status()
    {
        $param = input('param.');
        $model = new ManagerCompanyModel();
        $mpmodel = new ManagerPasswordModel;
        try{
            $model->changeStatus(['comid'=>$param['comid'],'mid'=>$param['mid']],-1);
            $mpmodel->changeStates(['comid'=>$param['comid'],'mid'=>$param['mid']],-1);
        }catch(\Exception $e){
            systembug($e->getMessage(),2,$this->url);
            return admin_json(-1, '修改失败'.$e->getMessage());
        }
        return admin_json(1, '修改成功');
    }
}